<?php
session_start();
?>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link type="text/css" href="../bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
        <script type="text/javascript" src="../bootstrap/js/bootstrap.min.js"></script>
    </head>
    <body>
        <?php
            if (empty($_SESSION['adminuser']) || !isset($_SESSION['adminuser'])) {
                echo '<script langquage="javascript">window.location="index.php";</script>';
            }
        ?>
        <table border="1" width="1024" cellspacing="0" cellpadding="0" align="center">            
            <tr>
                <td colspan="2" width="1024" height="100">[Header]</td>
            </tr>
            <tr>
                <td colspan="2" width="1024">&nbsp;</td>
            </tr>
            <tr>
                <td width="260" height="100" valign="top">
                    <form name="frmLogout" method="post" action="index.php">
                        <table border="1" width="260" height="100"> 
                            <tr>
                                <td height="30">[massage]</td>
                            </tr>
                            <tr>
                                <td>
                                    ยินดีต้อนรับ&nbsp;<?php echo $_SESSION['adminuser']; ?><br/>
                                    <input type="submit" name="btnAdminLogout" id="btnAdminLogout" value="Logout" class="btn btn-danger">
                                </td>
                            </tr>
                        </table>
                    </form>
                </td> 
                <td rowspan="2" width="764" valign="top">
                    <?php
                    if (isset($_GET['customer'])) {
                        include 'customer.php';
                    } else if (isset($_GET['homestay'])) {
                        include 'homestay.php';
                    } else if (isset($_GET['homestay_room'])) {
                        include 'homestay_room.php';
                    } else if (isset($_GET['booking'])) {
                        include 'booking.php';
                    } else if (isset($_GET['permission'])) {
                        include 'permission.php';
                    } else if (isset($_GET['checkout'])) {
                        include 'checkout.php';
                    } else if (isset($_GET['do_checkout'])) {
                        include 'do_checkout.php';
                    } else if (isset($_GET['service_type'])) {
                        include 'service_type.php';
                    } else if (isset($_GET['booking_detail'])) {
                        include 'booking_detail.php';
                    }
                    ?>
                </td>
            </tr>
            <tr height="400">
                <td width="260" valign="top">

                    <table border="1" width="260"  height="100">
                        <tr>
                            <td height="30">[massage]</td>
                        </tr>
                        <tr>
                            <td>
                                <ul>
                                    <li><a href="main.php?customer=true">Customer</a></li>
                                    <li><a href="main.php?permission=true">Admin</a></li>
                                </ul>
                            </td>
                        </tr>
                    </table>

                    <table border="1" width="260" height="100">
                        <tr>
                            <td height="30">[massage]</td>
                        </tr>
                        <tr>
                            <td>
                                <ul>
                                    <li><a href="main.php?homestay=true">Home Stay</a></li>
                                    <li><a href="main.php?homestay_room=true">Room</a></li>
                                    <li><a href="main.php?service_type=true">Service Type</a></li>
                                </ul>
                            </td>
                        </tr>
                    </table>

                    <table border="1" width="260" height="100">
                        <tr>
                            <td height="30">[massage]</td>
                        </tr>
                        <tr>
                            <td>
                                <ul>
                                    <li><a href="main.php?booking=true">Booking</a></li>
                                    <!--
                                    <li><a href="#">Check-in</a></li>
                                    -->
                                    <li><a href="main.php?checkout=true">Check-out</a></li>
                                </ul>
                            </td>
                        </tr>
                    </table>

                    <table border="1" width="260" height="100">
                        <tr>
                            <td height="30">[massage]</td>
                        </tr>
                        <tr>
                            <td>
                                <ul>
                                    <li><a href="#">Report 1</a></li>
                                    <li><a href="#">Report 2</a></li>
                                    <li><a href="#">Report 3</a></li>
                                </ul>
                            </td>
                        </tr>
                    </table>

                </td>
            </tr> 
        </table>
    </body>
</html>